 <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            width: 100vw;
            height: 100vh;
        }
        .main {
            display: flex;
            justify-content: center;
            width: 90vw;
        }
        .item {
            position: relative;
            cursor: pointer;
            height: 90vh;
            color: #0b67f1;
            background-size: cover;
            border-radius: 50px;
            flex: 0.5;
            margin: 10px;
            transition: all 700ms ease-in;
        }
        .item h3 {
            position: absolute;
            left: 20px;
            bottom: 20px;
            font-size: 24px;
            opacity: 0;
        }
        .item.active {
            flex: 5;
        }
        .item.active h3 {
            opacity: 1;
            transition: opacity 0.3s ease-in 0.4;
        }
    </style>
</head>
<body>
    <div class="main">
        <div class="item active" style="background-image: url(./images/road.jpg);">
            <h3>hhh</h3>
        </div>
        <div class="item" style="background-image: url(./images/road.jpg);">
            <h3>hhh</h3>
        </div>
        <div class="item" style="background-image: url(./images/road.jpg);">
            <h3>hhh</h3>
        </div>
        <div class="item" style="background-image: url(./images/road.jpg);">
            <h3>hhh</h3>
        </div>
        <div class="item" style="background-image: url(./images/road.jpg);">
            <h3>hhh</h3>
        </div>
    </div>

    <script>
        let items = document.querySelectorAll(".item");

        items.forEach(item => {
            item.addEventListener("click", () => {
                removeActiveClass();
                item.classList.add("active");
            })
        });

        function removeActiveClass() {
            items.forEach(item => {
                item.classList.remove("active")
            })
        };
    </script>
</body>
</html> 

